<style type="text/css" media="screen">
.tv_hot {
}
.avatar {
    position: relative;
}
.tv_hot .avatar {
    display: block;
    overflow: hidden;
}
.tv_hot .avatar img {
}
.avatar:after {
    bottom: 0;
    content: url("~@/icons/play_button.png");
    left: 5px;
    position: absolute;
    top: 30%;
    left: 40%;
    z-index: 10;
}
</style>
<template>
    <div class="mt50 p40 pt0 bg-white">
        <div class="text-center f20 p20 f36">最新视频</div>
        <div class="ui-center-width flex space-between flex-wrap">
            <router-link tag="div" :to="{name:'文章详情',query:{id:item.object_id}}" v-for="item in list" :key="item.id" class="inline-block mr5 ml5 mb10 cursor-pointer" style="width:15.85%">
                <div class="tv_hot fl"><ui-img :url="item.smeta.thumb" style="width:100%;height:120px" class="avatar"></ui-img></div>
                <p class="f-color-text clamp-1">{{item.post_title}}</p>
            </router-link>
        </div>
    </div>
</template>
<script>
    export default {
        data(){
            return {
                list:[]
            }
        },
        mounted(){
            this.$http.get('index.php?g=home&m=content&a=get_attr_posts', {
                params:{
                    posttype:1,
                    page_size:12,
                    cid:15
                }
            })
            .then(({data})=>{
                // console.log('最新视频',data)
                if (data.code===1) {
                    this.list = data.data
                }
            })
        },
    }
</script>
